Optimal. Leaf size=115 \[ \frac {b^3 \log \left (a+b \tan ^2(e+f x)\right )}{2 a^3 f (a-b)}+\frac {(a+b) \cot ^2(e+f x)}{2 a^2 f}+\frac {\left (a^2+a b+b^2\right ) \log (\tan (e+f x))}{a^3 f}+\frac {\log (\cos (e+f x))}{f (a-b)}-\frac {\cot ^4(e+f x)}{4 a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3670, 446, 72} \[ \frac {b^3 \log \left (a+b \tan ^2(e+f x)\right )}{2 a^3 f (a-b)}+\frac {\left (a^2+a b+b^2\right ) \log (\tan (e+f x))}{a^3 f}+\frac {(a+b) \cot ^2(e+f x)}{2 a^2 f}+\frac {\log (\cos (e+f x))}{f (a-b)}-\frac {\cot ^4(e+f x)}{4 a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 72
Rule 446
Rule 3670
Rubi steps
\begin {align*} \int \frac {\cot ^5(e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{x^5 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{x^3 (1+x) (a+b x)} \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {1}{a x^3}+\frac {-a-b}{a^2 x^2}+\frac {a^2+a b+b^2}{a^3 x}-\frac {1}{(a-b) (1+x)}+\frac {b^4}{a^3 (a-b) (a+b x)}\right ) \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=\frac {(a+b) \cot ^2(e+f x)}{2 a^2 f}-\frac {\cot ^4(e+f x)}{4 a f}+\frac {\log (\cos (e+f x))}{(a-b) f}+\frac {\left (a^2+a b+b^2\right ) \log (\tan (e+f x))}{a^3 f}+\frac {b^3 \log \left (a+b \tan ^2(e+f x)\right )}{2 a^3 (a-b) f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.37, size = 83, normalized size = 0.72 \[ -\frac {-\frac {b^3 \log \left (a \cot ^2(e+f x)+b\right )}{a^3 (a-b)}-\frac {(a+b) \cot ^2(e+f x)}{a^2}-\frac {2 \log (\sin (e+f x))}{a-b}+\frac {\cot ^4(e+f x)}{2 a}}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 163, normalized size = 1.42 \[ \frac {2 \, b^{3} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{3} - b^{3}\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{4} + {\left (3 \, a^{3} - a^{2} b - 2 \, a b^{2}\right )} \tan \left (f x + e\right )^{4} - a^{3} + a^{2} b + 2 \, {\left (a^{3} - a b^{2}\right )} \tan \left (f x + e\right )^{2}}{4 \, {\left (a^{4} - a^{3} b\right )} f \tan \left (f x + e\right )^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.92, size = 264, normalized size = 2.30 \[ \frac {b^{3} \ln \left (a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b \right )}{2 f \,a^{3} \left (a -b \right )}-\frac {1}{16 f a \left (-1+\cos \left (f x +e \right )\right )^{2}}-\frac {7}{16 f a \left (-1+\cos \left (f x +e \right )\right )}-\frac {b}{4 f \,a^{2} \left (-1+\cos \left (f x +e \right )\right )}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right )}{2 f a}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right ) b}{2 f \,a^{2}}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right ) b^{2}}{2 f \,a^{3}}-\frac {1}{16 f a \left (1+\cos \left (f x +e \right )\right )^{2}}+\frac {7}{16 f a \left (1+\cos \left (f x +e \right )\right )}+\frac {b}{4 f \,a^{2} \left (1+\cos \left (f x +e \right )\right )}+\frac {\ln \left (1+\cos \left (f x +e \right )\right )}{2 f a}+\frac {\ln \left (1+\cos \left (f x +e \right )\right ) b}{2 f \,a^{2}}+\frac {\ln \left (1+\cos \left (f x +e \right )\right ) b^{2}}{2 f \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.46, size = 96, normalized size = 0.83 \[ \frac {\frac {2 \, b^{3} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{4} - a^{3} b} + \frac {2 \, {\left (a^{2} + a b + b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{3}} + \frac {2 \, {\left (2 \, a + b\right )} \sin \left (f x + e\right )^{2} - a}{a^{2} \sin \left (f x + e\right )^{4}}}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.78, size = 118, normalized size = 1.03 \[ \frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a^2+a\,b+b^2\right )}{a^3\,f}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f\,\left (a-b\right )}-\frac {b^3\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}{f\,\left (2\,a^3\,b-2\,a^4\right )}-\frac {{\mathrm {cot}\left (e+f\,x\right )}^4\,\left (\frac {1}{4\,a}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (a+b\right )}{2\,a^2}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 94.47, size = 908, normalized size = 7.90 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________